package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import com.rzl.expense.expense.domain.EleBillaccount;
import com.rzl.expense.expense.mapper.EleBillaccountMapper;
import com.rzl.expense.expense.service.IEleBillaccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 电费报账点Service业务层处理
 * 
 * @author expense
 * @date 2024-11-22
 */
@Service
public class EleBillaccountServiceImpl implements IEleBillaccountService
{
    @Autowired
    private EleBillaccountMapper eleBillaccountMapper;

    /**
     * 查询电费报账点
     * 
     * @param billaccountId 电费报账点主键
     * @return 电费报账点
     */
    @Override
    public EleBillaccount selectEleBillaccountByBillaccountId(String billaccountId)
    {
        return eleBillaccountMapper.selectEleBillaccountByBillaccountId(billaccountId);
    }

    /**
     * 查询电费报账点列表
     * 
     * @param eleBillaccount 电费报账点
     * @return 电费报账点
     */
    @Override
    public List<EleBillaccount> selectEleBillaccountList(EleBillaccount eleBillaccount)
    {
        return eleBillaccountMapper.selectEleBillaccountList(eleBillaccount);
    }

    /**
     * 新增电费报账点
     * 
     * @param eleBillaccount 电费报账点
     * @return 结果
     */
    @Override
    public int insertEleBillaccount(EleBillaccount eleBillaccount)
    {
        eleBillaccount.setCreateTime(DateUtils.getNowDate());
        return eleBillaccountMapper.insertEleBillaccount(eleBillaccount);
    }

    /**
     * 修改电费报账点
     * 
     * @param eleBillaccount 电费报账点
     * @return 结果
     */
    @Override
    public int updateEleBillaccount(EleBillaccount eleBillaccount)
    {
        eleBillaccount.setUpdateTime(DateUtils.getNowDate());
        return eleBillaccountMapper.updateEleBillaccount(eleBillaccount);
    }

    /**
     * 批量删除电费报账点
     * 
     * @param billaccountIds 需要删除的电费报账点主键
     * @return 结果
     */
    @Override
    public int deleteEleBillaccountByBillaccountIds(String[] billaccountIds)
    {
        return eleBillaccountMapper.deleteEleBillaccountByBillaccountIds(billaccountIds);
    }

    /**
     * 删除电费报账点信息
     * 
     * @param billaccountId 电费报账点主键
     * @return 结果
     */
    @Override
    public int deleteEleBillaccount()
    {
        return eleBillaccountMapper.deleteEleBillaccount();
    }




    @Override
    public void batchEleBillaccount(List<EleBillaccount> list)
    {

         eleBillaccountMapper.batchEleBillaccount(list);
    }


}
